<template>
    <div class="home-skeleton">
        <div v-for="i in 4" :key="i">
            <el-skeleton animated :style="{backgroundColor:bg}" style="height: 406px;">
                <template slot="template" >
                    <el-skeleton-item variant="image" style="width: 306px; height: 306px;"/>
                    <div style="padding-top: 20px">
                        <el-skeleton-item variant="h3" style="width: 50%;"/>
                    </div>
                    <div style="padding-top: 15px;">
                        <el-skeleton-item variant="text" style="width: 30%;"/>
                    </div>
                </template>
            </el-skeleton>
        </div>
    </div>
</template>

<script>
    export default {
        name: "HomeSkeleton",
        props: {
            bg: {
                type: String,
                default: '#fff'
            }
        }
    }
</script>

<style scoped lang="less">

    .home-skeleton {
        display: flex;
        justify-content: space-between;
        width: 1240px;
        text-align: center;
    }

</style>